def counter(start_at=0):
	#count =[5],so count is a list
	count=[start_at]
	def incr():
		count[0]+=1
		return count[0]
	return incr

c=counter(5)
print c()

s = "I am is global"

def num_func(a,b):
	num = 100
	def add_func(c,d):
		print a
		print b
		print 'locals of add_func',locals()
	print 'locals of num_func',locals()
	print 
	return add_func(a,b)
num_func(3,6)
print 'globals',globals()
	


